<?php use_stylesheets_for_form($form); ?>
<?php use_javascripts_for_form($form); ?>
<form action="<?php echo url_for($form->getActionUrlParams()) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
  <table>
    <tfoot>
      <tr>
        <td colspan="2">
          <?php if (!$form->getObject()->isNew()): ?>
          &nbsp;<?php echo link_to( __('Delete'), array('table' => sfContext::getInstance()->getRequest()->getParameter('table'),'action' => 'delete', 'id' => $form->getObject()->getId()), array('class'=>'button', 'method' => 'delete', 'confirm' => __('Are you sure?'))) ?>
          <?php endif; ?>
          <input class="button" type="submit" value="<?php echo __('Save') ?>" />
        </td>
      </tr>
    </tfoot>
    <tbody>
      <?php echo $form; ?>
    </tbody>
  </table>
</form>